package org.six11.ss.client;

import org.six11.ss.shared.Message;
import org.six11.util.adt.MultiState;

/**
 * 
 * 
 * @author Gabe Johnson <johnsogg@cmu.edu>
 */
public class NickCommandHandler extends CommandHandler {

  /**
   * @param state
   */
  public NickCommandHandler(MultiState state) {
    super(state);
  }

  @Override
  public void handleCommand(String args) {
    if (args != null && args.trim().length() > 0) {
      String trimmed = args.trim();
      bug("Attempting to change nick to " + trimmed);
      Message msg = new Message("nick");
      msg.addParam("newNick", trimmed);
      sendMessage(msg);
    }
  }

}
